home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 51 / PCGamer51_17Demos.iso / VIDEO / V102401.dxr / 00017_Go to Marker.ls < prev    next >
Encoding:
Text File  |  2000-10-03  |  1.9 KB  |  68 lines

  1. property whichevent, WhichLabel, playMode
  2.  
  3. on initGotoMarker me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11.   cursor(-1)
  12. end
  13.  
  14. on mouseEnter me
  15.   cursor(280)
  16. end
  17.  
  18. on mouseLeave me
  19.   cursor(-1)
  20. end
  21.  
  22. on prepareFrame me
  23.   if whichevent = #prepareFrame then
  24.     init(me)
  25.   end if
  26. end
  27.  
  28. on exitFrame me
  29.   if whichevent = #exitFrame then
  30.     init(me)
  31.   end if
  32. end
  33.  
  34. on init me
  35.   if the playMode of me = "Go to" then
  36.     case WhichLabel of
  37.       #previous:
  38.         go(marker(-1))
  39.       #loop:
  40.         go(marker(0))
  41.       #next:
  42.         go(marker(1))
  43.       otherwise:
  44.         go(WhichLabel)
  45.     end case
  46.   else
  47.     case WhichLabel of
  48.       #previous:
  49.         play frame marker(-1)
  50.       #loop:
  51.         play frame marker(0)
  52.       #next:
  53.         play frame marker(1)
  54.       otherwise:
  55.         play frame WhichLabel
  56.     end case
  57.   end if
  58. end
  59.  
  60. on getPropertyDescriptionList
  61.   set p_list to [#WhichLabel: [#comment: "Destination Marker:", #format: #marker, #default: "#Loop"], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #prepareFrame, #exitFrame, #initGotoMarker], #default: #mouseUp], #playMode: [#comment: "Play Mode:", #format: #symbol, #range: ["Go to", "Play and Return"], #default: "Go to"]]
  62.   return p_list
  63. end
  64.  
  65. on getBehaviorDescription
  66.   return "Moves the Playback Head to a designated marker when the specified event occurs.  Drag to a sprite or a frame in the script channel." && RETURN & "PARAMETERS:" && RETURN & "ΓÇó Destination Marker - Choose from a list of all marker names in the current movie or choose Previous, Loop (Current), or Next." && RETURN & "ΓÇó Initializing Event - Specify the event that triggers the behavior." & RETURN & "ΓÇó Play Mode - Choose Play and Return to make the Playback Head return to the current location when the Play Done behavior is encountered. Choose Go To to make the Playback Head continue from the specified frame until explicitly sent to a new location."
  67. end
  68.